package com.itwxz.system.domain.dto;

import com.itwxz.common.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CreateWxzOrderDto implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 机主姓名
     */
    @Excel(name = "机主名称")
    @NotBlank(message = "机主姓名不能为空")
    @Size(max = 20, message = "姓名长度不能超过20个字符")
    @Schema(description = "机主姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    private String name;

    /**
     * 身份类型
     */
    @Excel(name = "身份")
    @NotNull(message = "身份不能为空")
    @Min(value = 1, message = "身份类型最小值1")
    @Max(value = 3, message = "身份类型最大值3")
    @Schema(description = "身份类型(1:学生 0:老师)",
            requiredMode = Schema.RequiredMode.REQUIRED,
            example = "1")
    private Integer identity;

    /**
     * 学号
     */
    @Excel(name = "学号")
    @Size(max = 20, message = "学号长度不能超过20个字符")
    @Schema(description = "学号", example = "20230001")
    private String studentId;

    /**
     * 宿舍楼栋
     */
    @Excel(name = "宿舍栋数")
    @Size(max = 10, message = "栋数描述过长")
    @Schema(description = "宿舍楼栋名称", example = "26栋")
    private String building;

    /**
     * 宿舍房间号
     */
    @Excel(name = "宿舍号")
    @Size(max = 10, message = "宿舍号长度不能超过10个字符")
    @Schema(description = "宿舍房间号", example = "101")
    private String dormitory;

    /**
     * 联系电话
     */
    @Excel(name = "手机号")
    @NotBlank(message = "联系电话不能为空")
    @Schema(description = "联系电话",
            requiredMode = Schema.RequiredMode.REQUIRED,
            example = "13800138000")
    private String phone;

    /**
     * 报修类型
     */
    @Excel(name = "订单类型")
    @Schema(description = "报修类型(1软件,2硬件,3网络,4手机)",
            requiredMode = Schema.RequiredMode.REQUIRED,
            example = "2")
    private Integer type;

    /**
     * 故障描述
     */
    @Excel(name = "订单详情")
    @NotBlank(message = "故障描述不能为空")
    @Size(max = 100, message = "描述内容过长")
    @Schema(description = "故障详情描述",
            requiredMode = Schema.RequiredMode.REQUIRED,
            example = "宿舍空调不制冷")
    private String details;

}
